package com.air.ota.vo;

import com.air.ota.util.PkgUtil;

public class UTKDepositResultUplinkVO extends UTKBaseUplinkPgkVO {
	
	protected byte[] cardAppSequence;
	protected byte[] depositSequence;
	protected byte[] result;
	protected byte[] tac;
	protected byte[] remain;
	protected byte[] cardTransSequence;
	protected byte[] pkgSequence;
	
	
	public UTKDepositResultUplinkVO(byte[] cardSequence){
		super();
		cardAppSequence = new byte[8];
		depositSequence = new byte[2];
		result = new byte[2];
		tac = new byte[4];
		remain=new byte[4];
		cardTransSequence = new byte[2];
		pkgSequence = new byte[4];
		super.cardSequence = cardSequence;
	}
	
	public void parse(byte[] pkg){
		super.parse(pkg);
		decryptCmdData();
		
		System.arraycopy(this.cmdData, 0, this.cardAppSequence, 0, 8);
		System.arraycopy(this.cmdData, 8, this.depositSequence, 0, 2);
		System.arraycopy(this.cmdData, 10, this.result, 0, 2);
		System.arraycopy(this.cmdData, 12, this.tac, 0, 4);
		System.arraycopy(this.cmdData, 16, this.remain, 0, 4);
		System.arraycopy(this.cmdData, 20, this.cardTransSequence, 0, 2);
		System.arraycopy(this.cmdData, 22, this.pkgSequence, 0, 4);
		
		PkgUtil.setCurrentPkgSequence(pkgSequence);
		
	}
	
	public byte[] getCardAppSequence() {
		return cardAppSequence;
	}

	public byte[] getDepositSequence() {
		return depositSequence;
	}

	public byte[] getResult() {
		return result;
	}

	public byte[] getTac() {
		return tac;
	}

	public byte[] getRemain() {
		return remain;
	}

	public byte[] getCardTransSequence() {
		return cardTransSequence;
	}

	public byte[] getPkgSequence() {
		return pkgSequence;
	}
	
	
	
	
}
